import React, { Component } from 'react';

class Index extends Component {
    constructor(props) {
        super(props)
        this.state = {

        }
        this.myRef = React.createRef()
    }
    render() {
        return (
            <div>
                <p ref={this.myRef}>hello</p>
            </div>
        );
    }
    componentDidMount() {
        console.log(this.myRef.current);
    }
}

export default Index;
